import pyautogui
import time

time.sleep(2)

# 截图
pyautogui.screenshot()
# 传入图像，定位出图像在屏幕截图中的坐标位置
locate = pyautogui.locateOnScreen('people.png', confidence=0.8)
print(locate)
# 定位区域的中心位置
# center = pyautogui.center(locate)

for pos in pyautogui.locateAllOnScreen('people.png', confidence=0.8):
    print(pos)